﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp21
{
    class AgeSort : Comparer<Student>
    {
        public override int Compare(Student x, Student y)
        {
            if (x.id > y.id)
            {
                return 1;
            }
            else
            {
                return -1;
            }
        }
    }
    class IdSort : IComparer<Student>
    {
        public int Compare(Student x, Student y)
        {
            if (x.age > y.age)
            {
                return 1;
            }
            else
            {
                return -1;
            }
        }
    }
    class NameSort : Comparer<Student>
    {
        public override int Compare(Student x, Student y)
        {
            return x.name.CompareTo(x.name);
        }
    }
}
